﻿using Modules.Project;
using PetaPoco;
using PmSoft;
using PmSoft.Caching;
using System.ComponentModel;

namespace Modules
{
    /// <summary>
    /// 项目保证金收入信息
    ///</summary>
    [TableName("project_guarantee_income")]
    [Description("项目保证金收入信息")]
    [PrimaryKey("id", AutoIncrement = true)]
    [CacheSetting(true)]
    [Serializable]
    public class ProjectGuaranteeIncome : IEntity
    {
        /// <summary>
        ///
        ///</summary>
        [Column("id")]
        public int Id { get; set; }

        /// <summary>
        /// 项目Id
        ///</summary>
        [Column("project_id")]
        public int ProjectId { get; set; }

        /// <summary>
        /// 保证金缴纳信息Id
        ///</summary>
        [Column("guarantee_payment_id")]
        public int? GuaranteePaymentId { get; set; }

        /// <summary>
        /// 动用通知书文号
        ///</summary>
        [Column("notification_letter")]
        public string NotificationLetter { get; set; }

        /// <summary>
        /// 收入编号
        ///</summary>
        [Column("code")]
        public string Code { get; set; }

        /// <summary>
        /// 交易类型(100：资金入账 102：代发工资 103：计息 104：手续费 105：其他)
        ///</summary>
        [Column("trading_type")]
        public 交易类型? TradingType { get; set; }

        /// <summary>
        /// 缴存类型（100：按预设比例缴存 101：免除保证金 102：减少保证金应交金额 103：缓缴保证金 104：增加保证金应缴金额）
        ///</summary>
        [Column("deposite_type")]
        public 缴存类型? DepositeType { get; set; }

        /// <summary>
        /// 收支方式(100：现金 101：银行保函 102：工程担保公司保函 103：工程保证保险 104：其它)
        ///</summary>
        [Column("income_way")]
        public 收支方式? IncomeWay { get; set; }

        /// <summary>
        /// 收支金额
        ///</summary>
        [Column("amount")]
        public decimal? Amount { get; set; }

        /// <summary>
        /// 收支日期
        ///</summary>
        [Column("pay_date")]
        public DateTime? PayDate { get; set; }

        /// <summary>
        /// 创建人
        ///</summary>
        [Column("creator")]
        public string Creator { get; set; }

        /// <summary>
        /// 创建时间
        ///</summary>
        [Column("create_time")]
        public DateTime? CreateTime { get; set; }

        #region IEntity 成员

        [Ignore]
        object IEntity.EntityId { get { return this.Id; } }

        #endregion IEntity 成员
    }
}